package com.gitee.huanminabc.jtimerwheel.base;

import com.gitee.huanminabc.jtimerwheel.enums.TimerDynamicStatus;
import com.gitee.huanminabc.jtimerwheel.enums.TimerStatus;

/**
 * 简要描述
 *
 * @Author: huanmin
 * @Date: 2022/11/30 17:04
 * @Version: 1.0
 * @Description: 文件作用详细描述....
 */
public class TimerNode {
    public long expires; //到期时间  秒时间戳
    public TimerResolverCore timerResolver; //任务计划解析后对象
    public String strResolver; //保留任务计划字符串,用于后期重新解析
    public Runnable func; //回调函数
    public String timerId; //定时器名称
    public TimerStatus timerStatus; //定时器状态(0:停止,1:启动,2:待删除,3确认删除,4重启任务)
    public TimerDynamicStatus timerDynamic; //0:等待执行,1:执行中 (用于展示任务的状况)
    public String key;//插槽的key
    public TimerNodeData timerNodeData; //当前任务所在的插槽

    @Override
    public String toString() {
        return "TimerNode{" +
                "expires=" + expires +
                ", timerResolver=" + timerResolver +
                ", strResolver='" + strResolver + '\'' +
                ", func=" + func +
                ", timerId='" + timerId + '\'' +
                ", timerStatus=" + timerStatus +
                ", timerDynamic=" + timerDynamic +
                ", key='" + key + '\'' +
                '}';
    }
}
